package com.lianzai.common.utils.okhttp;

import com.fasterxml.jackson.core.type.TypeReference;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

public class LzOkHttpBuilder {

  private String url;
  private Map<String, String> headers;
  private Map<String, String> params;
  private TypeReference typeReference;
  private Object tag;
  private String body;

  public static LzOkHttpBuilder.LzOkHttpBuilderBuilder builder() {
    return new LzOkHttpBuilder.LzOkHttpBuilderBuilder();
  }

  public String getUrl() {
    return this.url;
  }

  public Map<String, String> getHeaders() {
    return this.headers;
  }

  public Map<String, String> getParams() {
    return this.params;
  }

  public TypeReference getTypeReference() {
    return this.typeReference;
  }

  public Object getTag() {
    return this.tag;
  }

  public String getBody() {
    return this.body;
  }

  public void setUrl(String url) {
    this.url = url;
  }

  public void setHeaders(Map<String, String> headers) {
    this.headers = headers;
  }

  public void setParams(Map<String, String> params) {
    this.params = params;
  }

  public void setTypeReference(TypeReference typeReference) {
    this.typeReference = typeReference;
  }

  public void setTag(Object tag) {
    this.tag = tag;
  }

  public void setBody(String body) {
    this.body = body;
  }

  public boolean equals(Object o) {
    if(o == this) {
      return true;
    } else if(!(o instanceof LzOkHttpBuilder)) {
      return false;
    } else {
      LzOkHttpBuilder other = (LzOkHttpBuilder)o;
      if(!other.canEqual(this)) {
        return false;
      } else {
        String this$url = this.getUrl();
        String other$url = other.getUrl();
        if(this$url == null) {
          if(other$url != null) {
            return false;
          }
        } else if(!this$url.equals(other$url)) {
          return false;
        }

        Map this$headers = this.getHeaders();
        Map other$headers = other.getHeaders();
        if(this$headers == null) {
          if(other$headers != null) {
            return false;
          }
        } else if(!this$headers.equals(other$headers)) {
          return false;
        }

        Map this$params = this.getParams();
        Map other$params = other.getParams();
        if(this$params == null) {
          if(other$params != null) {
            return false;
          }
        } else if(!this$params.equals(other$params)) {
          return false;
        }

        label62: {
          TypeReference this$typeReference = this.getTypeReference();
          TypeReference other$typeReference = other.getTypeReference();
          if(this$typeReference == null) {
            if(other$typeReference == null) {
              break label62;
            }
          } else if(this$typeReference.equals(other$typeReference)) {
            break label62;
          }

          return false;
        }

        label55: {
          Object this$tag = this.getTag();
          Object other$tag = other.getTag();
          if(this$tag == null) {
            if(other$tag == null) {
              break label55;
            }
          } else if(this$tag.equals(other$tag)) {
            break label55;
          }

          return false;
        }

        String this$body = this.getBody();
        String other$body = other.getBody();
        if(this$body == null) {
          if(other$body != null) {
            return false;
          }
        } else if(!this$body.equals(other$body)) {
          return false;
        }

        return true;
      }
    }
  }

  protected boolean canEqual(Object other) {
    return other instanceof LzOkHttpBuilder;
  }

  public int hashCode() {
    boolean PRIME = true;
    byte result = 1;
    String $url = this.getUrl();
    int result1 = result * 59 + ($url == null?43:$url.hashCode());
    Map $headers = this.getHeaders();
    result1 = result1 * 59 + ($headers == null?43:$headers.hashCode());
    Map $params = this.getParams();
    result1 = result1 * 59 + ($params == null?43:$params.hashCode());
    TypeReference $typeReference = this.getTypeReference();
    result1 = result1 * 59 + ($typeReference == null?43:$typeReference.hashCode());
    Object $tag = this.getTag();
    result1 = result1 * 59 + ($tag == null?43:$tag.hashCode());
    String $body = this.getBody();
    result1 = result1 * 59 + ($body == null?43:$body.hashCode());
    return result1;
  }

  public String toString() {
    return "LzOkHttpBuilder(url=" + this.getUrl() + ", headers=" + this.getHeaders() + ", params=" + this.getParams() + ", typeReference=" + this.getTypeReference() + ", tag=" + this.getTag() + ", body=" + this.getBody() + ")";
  }

  public LzOkHttpBuilder() {
  }

  public LzOkHttpBuilder(String url, Map<String, String> headers, Map<String, String> params, TypeReference typeReference, Object tag, String body) {
    this.url = url;
    this.headers = headers;
    this.params = params;
    this.typeReference = typeReference;
    this.tag = tag;
    this.body = body;
  }

  public static class LzOkHttpBuilderBuilder {
    private String url;
    private Map<String, String> headers;
    private Map<String, String> params;
    private TypeReference typeReference;
    private Object tag;
    private String body;

    LzOkHttpBuilderBuilder() {
    }

    public LzOkHttpBuilder.LzOkHttpBuilderBuilder url(String url) {
      this.url = url;
      return this;
    }

    public LzOkHttpBuilder.LzOkHttpBuilderBuilder headers(Map<String, String> headers) {
      this.headers = headers;
      return this;
    }

    public LzOkHttpBuilder.LzOkHttpBuilderBuilder params(Map<String, String> params) {
      this.params = params;
      return this;
    }

    public LzOkHttpBuilder.LzOkHttpBuilderBuilder typeReference(TypeReference typeReference) {
      this.typeReference = typeReference;
      return this;
    }

    public LzOkHttpBuilder.LzOkHttpBuilderBuilder tag(Object tag) {
      this.tag = tag;
      return this;
    }

    public LzOkHttpBuilder.LzOkHttpBuilderBuilder body(String body) {
      this.body = body;
      return this;
    }

    public LzOkHttpBuilder build() {
      return new LzOkHttpBuilder(this.url, this.headers, this.params, this.typeReference, this.tag, this.body);
    }

    public String toString() {
      return "LzOkHttpBuilder.LzOkHttpBuilderBuilder(url=" + this.url + ", headers=" + this.headers + ", params=" + this.params + ", typeReference=" + this.typeReference + ", tag=" + this.tag + ", body=" + this.body + ")";
    }
  }

}
